package Exceptions;

import Conf.Consts;

public class GameCenterException extends StrategoException {

	private static final long serialVersionUID = Consts.Version;
	private GameCenterExceptionType type;

	public enum GameCenterExceptionType {
		UsernameTaken("Username already taken"),
		InvalidNumberOfPlayers("Invaild number of players!"), 
		InvalidNumberOfAIs("Invaild number of Ai players!"), 
		GameFull("Game is already full."), 
		NoAvaliableGames("there are no games available."), 
		NoSuchGame("no such game."), 
		MissingSignupInformation("You must enter a username, password and email"), 
		NoSuchUser("No Such User"), WrongPassword("Wrong password");
		
		private String msg;
		GameCenterExceptionType(String msg) {
			this.msg = msg;
		}
		public String getMsg() {
			return msg;
		}
	}
	
	public GameCenterException(GameCenterExceptionType type) {
		super(type.getMsg());
		this.type = type;
	}
	
	public GameCenterExceptionType getType() {
		return type;
	}

}
